package com.kun.lagou.seckillservice.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.time.Instant;

/**
 * 秒杀活动
 * @author Administrator
 */
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_lagou_seckill_activity")
public class SeckillActivity {
    @Id
    @GeneratedValue
    private long id;

    private String activityName;
    private String activityDesc;
    private BigDecimal price;
    private long commodityId;
    private int stock;
    private Instant startTime;
    private Instant endTime;
    @CreationTimestamp
    private Instant createTime;
    @UpdateTimestamp
    private Instant updateTime;

}
